﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CCM.CronTaskScheduler {


    /// <summary>
    /// Define a task to be run.
    /// </summary>
    public class TaskDefinition {
        public TaskDefinition() {
            CustomData = new Dictionary<string, object>();
        }
        /// <summary>
        /// A globally unique identifier for this task.
        /// If left unspecified, TaskName will be used for the UniqueID,
        /// in which case the TaskName must be unique
        /// </summary>
        public string UniqueID { get; set; }

        /// <summary>
        /// A name for this task.  If UniqueID is not specified,
        /// TaskName must be unique.        
        /// </summary>
        public string TaskName { get; set; }

        /// <summary>
        /// Defines a group name for this task.
        /// Leave null or empty to include this task
        /// in the global group.
        /// </summary>
        public string GroupName { get; set; }

        /// <summary>
        /// Class type which contains business logic
        /// for the task
        /// </summary>
        public Type TaskType { get; set; }

        /// <summary>
        /// Class type utilized to execute this task.        
        /// </summary>
        public Type ExecutorType { get; set; }

        /// <summary>
        /// Defines how this task will run
        /// </summary>
        public TaskRunMode RunMode { get; set; }

        public Dictionary<string, object> CustomData { get; set; }

    }
}
